function Student(name, age) {
  this.name = name;
  this.age = age;
}
// 怎么把人里面功能和方都拿过来

// console.log(Object.create(Person.prototype).constructor)

// Object 里提供一通过原型来创建一个空的对象
Student.prototype = Object.create(Person.prototype);
// 改原型对象里constructor的指向
Student.prototype.constructor = Student;

// 扩展自己公共功能
Student.prototype.study = function(hour, course) {
  return this.name + "学习" + course + hour + "小时";
}

// var s1 = new Student("李四", 20);

// console.log(s1.eat("肉"));
// console.log(s1.sleep(8));
// console.log(s1.study(7,"html5课程"));
// console.log(s1.constructor);
// console.log(s1);
